﻿Imports Microsoft.VisualStudio.TestTools.UnitTesting

Imports Moca.Util


Namespace Util

	'''<summary>
	'''ValidatorTest のテスト クラスです。すべての
	'''ValidatorTest 単体テストをここに含めます
	'''</summary>
	<TestClass()> _
	Public Class ValidatorTest

		Private testContextInstance As TestContext

		'''<summary>
		'''現在のテストの実行についての情報および機能を
		'''提供するテスト コンテキストを取得または設定します。
		'''</summary>
		Public Property TestContext() As TestContext
			Get
				Return testContextInstance
			End Get
			Set(value As TestContext)
				testContextInstance = value
			End Set
		End Property

#Region "追加のテスト属性"
		'
		'テストを作成するときに、次の追加属性を使用することができます:
		'
		'クラスの最初のテストを実行する前にコードを実行するには、ClassInitialize を使用
		'<ClassInitialize()>  _
		'Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
		'End Sub
		'
		'クラスのすべてのテストを実行した後にコードを実行するには、ClassCleanup を使用
		'<ClassCleanup()>  _
		'Public Shared Sub MyClassCleanup()
		'End Sub
		'
		'各テストを実行する前にコードを実行するには、TestInitialize を使用
		'<TestInitialize()>  _
		'Public Sub MyTestInitialize()
		'End Sub
		'
		'各テストを実行した後にコードを実行するには、TestCleanup を使用
		'<TestCleanup()>  _
		'Public Sub MyTestCleanup()
		'End Sub
		'
#End Region


		'''<summary>
		'''Verify のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub VerifyTest()
			Dim target As Validator = New Validator()
			Dim value As String = "-0;e0"
			Dim validates As ValidateTypes = ValidateTypes.HalfWidthAlphanumeric
			Dim expected As ValidateTypes = ValidateTypes.HalfWidthAlphanumeric
			Dim actual As ValidateTypes
			actual = target.Verify(value, validates)
			Assert.AreEqual(expected, actual)
		End Sub

#Region " IsValidRequiredTest "

		'''<summary>
		'''IsValidRequired のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidRequiredTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidRequired(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidRequired Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidRequiredErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.Required
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidRequired(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidNumericTest "

		'''<summary>
		'''IsValidNumeric のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidNumericTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidNumeric(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidNumeric Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidNumericErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.Numeric
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidNumeric(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidDateFormatTest "

		'''<summary>
		'''IsValidDateFormat のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidDateFormatTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidDateFormat(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidDateFormat Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidDateFormatErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.DateFormat
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidDateFormat(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidDecimalTest "

		'''<summary>
		'''IsValidDecimal のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidDecimalTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidDecimal(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidDecimal Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidDecimalErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.Decimal
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidDecimal(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidHalfWidthAlphanumericTest "

		'''<summary>
		'''IsValidHalfWidthAlphanumeric のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidHalfWidthAlphanumericTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidHalfWidthAlphanumeric(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidHalfWidthAlphanumeric のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidHalfWidthAlphanumericErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.HalfWidthAlphanumeric
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidHalfWidthAlphanumeric(validates)
		End Sub

#End Region
#Region " IsValidInJisTest "

		'''<summary>
		'''IsValidInJis のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidInJisTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidInJis(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidInJis Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidInJisErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.InJis
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidInJis(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidLenghtMaxTest "

		'''<summary>
		'''IsValidLenghtMax のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidLenghtMaxTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidLenghtMax(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidLenghtMax Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidLenghtMaxErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.LenghtMax
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidLenghtMax(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidLenghtMaxBTest "

		'''<summary>
		'''IsValidLenghtMaxB のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidLenghtMaxBTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidLenghtMaxB(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidLenghtMaxB Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidLenghtMaxBErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.LenghtMaxB
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidLenghtMaxB(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidLenghtMinTest "

		'''<summary>
		'''IsValidLenghtMin のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidLenghtMinTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidLenghtMin(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidLenghtMin Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidLenghtMinErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.LenghtMin
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidLenghtMin(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidLenghtMinBTest "

		'''<summary>
		'''IsValidLenghtMinB のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidLenghtMinBTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidLenghtMinB(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidLenghtMinB Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidLenghtMinBErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.LenghtMinB
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidLenghtMinB(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidMailTest "

		'''<summary>
		'''IsValidMail のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidMailTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidMail(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidMail Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidMailErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.Mail
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidMail(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidMaximumTest "

		'''<summary>
		'''IsValidMaximum のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidMaximumTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidMaximum(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidMaximum Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidMaximumErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.Maximum
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidMaximum(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidMinimumTest "

		'''<summary>
		'''IsValidMinimum のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidMinimumTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidMinimum(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidMinimum Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidMinimumErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.Minimum
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidMinimum(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidTelTest "

		'''<summary>
		'''IsValidTel のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidTelTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidTel(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidTel Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidTelErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.Tel
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidTel(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidURLTest "

		'''<summary>
		'''IsValidURL のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidURLTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidURL(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidURL Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidURLErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.URL
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidURL(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidWithNumericSignedTest "

		'''<summary>
		'''IsValidWithNumericSigned のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidWithNumericSignedTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidWithNumericSigned(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidWithNumericSigned Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidWithNumericSignedErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.WithNumericSigned
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidWithNumericSigned(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region
#Region " IsValidZipTest "

		'''<summary>
		'''IsValidZip のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidZipTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.None
			Dim expected As Boolean = True
			Dim actual As Boolean
			actual = target.IsValidZip(validates)
			Assert.AreEqual(expected, actual)
		End Sub

		'''<summary>
		'''IsValidZip Err のテスト
		'''</summary>
		<TestMethod()> _
		Public Sub IsValidZipErrTest()
			Dim target As Validator = New Validator()
			Dim validates As ValidateTypes = ValidateTypes.Zip
			Dim expected As Boolean = False
			Dim actual As Boolean
			actual = target.IsValidZip(validates)
			Assert.AreEqual(expected, actual)
		End Sub

#End Region

	End Class

End Namespace
